package com.doone.telmarket.infrastructure.webservice;

public class WSInterfacePortProxy implements com.doone.telmarket.infrastructure.webservice.WSInterfacePort {
	private String _endpoint = null;
	private com.doone.telmarket.infrastructure.webservice.WSInterfacePort wSInterfacePort = null;

	public WSInterfacePortProxy() {
		_initWSInterfacePortProxy();
	}

	public WSInterfacePortProxy(String endpoint) {
		_endpoint = endpoint;
		_initWSInterfacePortProxy();
	}

	private void _initWSInterfacePortProxy() {
		try {
			wSInterfacePort = (new com.doone.telmarket.infrastructure.webservice.WSInterfaceLocator())
					.getWSInterfacePort();
			if (wSInterfacePort != null) {
				if (_endpoint != null) {
					((javax.xml.rpc.Stub) wSInterfacePort)._setProperty("javax.xml.rpc.service.endpoint.address",
							_endpoint);
				} else {
					_endpoint = (String) ((javax.xml.rpc.Stub) wSInterfacePort)
							._getProperty("javax.xml.rpc.service.endpoint.address");
				}
			}

		} catch (javax.xml.rpc.ServiceException serviceException) {
		}
	}

	public String getEndpoint() {
		return _endpoint;
	}

	public void setEndpoint(String endpoint) {
		_endpoint = endpoint;
		if (wSInterfacePort != null) {
			((javax.xml.rpc.Stub) wSInterfacePort)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
		}

	}

	public com.doone.telmarket.infrastructure.webservice.WSInterfacePort getWSInterfacePort() {
		if (wSInterfacePort == null) {
			_initWSInterfacePortProxy();
		}
		return wSInterfacePort;
	}

	public com.doone.telmarket.infrastructure.webservice.Message webServiceIntf(
			com.doone.telmarket.infrastructure.webservice.Message message) throws java.rmi.RemoteException {
		if (wSInterfacePort == null) {
			_initWSInterfacePortProxy();
		}
		return wSInterfacePort.webServiceIntf(message);
	}

	public java.lang.String webserviceIntfs(java.lang.String servicename, java.lang.String xmlstring)
			throws java.rmi.RemoteException {
		if (wSInterfacePort == null) {
			_initWSInterfacePortProxy();
		}
		return wSInterfacePort.webserviceIntfs(servicename, xmlstring);
	}

}